import { ADDPATH, CHANGEBREAD, DELETEPATH } from "../constant"
import {
    DashboardOutlined,
} from '@ant-design/icons';

const initPre = [{
    icon: <DashboardOutlined />,
    label: "首页",
    herf:''
}]

interface action {
    type: String,
    data: any
}

export default function BreadReducer(preState = initPre, action: action) {
    const { type, data } = action
    switch (type) {
        case CHANGEBREAD:
            return data
        default:
            return preState
    }
}
